import java.util.ArrayList;

public class HelloWorld {
	
	// main是java的入口函数
	public static void main(String[] args) {
		// System.out.println();
		Student student = new Student();
		student.setId(1);
		student.setAge(23);
		student.setName("张三");
		// syso
		System.out.println(student);
		
		Student student2 = new Student(2, "李四", 23);
		System.out.println(student2);
		
		System.out.println("--------------------------");
		Student stu1 = new Student(1, "张三1", 12);
		Student stu2 = new Student(2, "张三2", 12);
		Student stu3 = new Student(3, "张三3", 12);
		Student stu4 = new Student(4, "张三4", 12);
		Student stu5 = new Student(5, "张三5", 12);
		// ArrayList是对数组的封装，让我们可以不用考虑下标的操作
		ArrayList<Student> list = new ArrayList<Student>();
		list.add(stu1);
		list.add(stu2);
		list.add(stu3);
		list.add(stu4);
		list.add(stu5);
//		for (int i = 0; i < list.size(); i++) {
//			
//		}
		
		for (Student stu : list) {
			System.out.println(stu);
		}
		
	}
}
